
local wusheng = fk.CreateSkill{
  name = "mini__wushen",
}

Fk:loadTranslationTable{
  ["mini__wushen"] = "武神",
  [":mini__wushen"] = "你可以将一张红色牌当【杀】使用或打出。你使用<font color='red'>♦</font>【杀】无距离限制，"..
  "<font color='red'>♥</font>【杀】无次数限制。",

  ["#mini__wushen"] = "武神：你可以将红色牌当【杀】使用或打出",

  ["$mini__wushen1"] = "千里追魂，一刀索命！",
  ["$mini__wushen2"] = "鬼龙斩月刀！",
}

wusheng:addEffect("viewas", {
  anim_type = "offensive",
  mute_card = true,
  pattern = "slash",
  prompt = "#mini__wushen",
  handly_pile = true,
  filter_pattern = {
    min_num = 1,
    max_num = 1,
    pattern = ".|.|red",
  },
  view_as = function(self, player, cards)
    if #cards ~= 1 then return end
    local c = Fk:cloneCard("slash")
    c.skillName = wusheng.name
    c:addSubcard(cards[1])
    return c
  end,
})

wusheng:addEffect("targetmod", {
  bypass_distances = function (self, player, skill, card)
    return player:hasSkill(wusheng.name) and card and card:matchVSPattern("slash|.|diamond")
  end,
  bypass_times = function (self, player, skill, scope, card, to)
    return player:hasSkill(wusheng.name) and card and card:matchVSPattern("slash|.|heart")
  end,
})

return wusheng
